home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 40
/
Amiga Format CD40 (1999-05-11)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-06].iso
/
-seriously_amiga-
/
misc
/
pdflib
/
p_port.h
< prev
next >
Wrap
C/C++ Source or Header
|
1999-03-24
|
2KB
|
82 lines
/* p_port.h
* Copyright (C) 1997-98 Thomas Merz. All rights reserved.
*
* PDFlib portability stuff
*/
#ifndef P_PORT_H
#define P_PORT_H
/* ---------------------- Windows -------------------*/
#ifdef _WIN32
#define WIN32
#define PDF_HAS_BOOL
#endif
#ifdef WIN32
#define NEED_GETOPT
#define READMODE "rb"
#define WRITEMODE "wb"
#endif
/* ---------------------- MS-DOS -------------------*/
#ifdef DOS
#define NEED_GETOPT
#define READMODE "rb"
#define WRITEMODE "wb"
#endif
/* ---------------------- Macintosh -------------------*/
#ifdef MAC
#define NEED_GETOPT
#define READMODE "rb"
#define WRITEMODE "wb"
#define PATHSEP ":"
#endif
/* ---------------------- NeXT -------------------*/
#ifdef NeXT
#endif
/* ---------------------- Defaults -------------------*/
/* Note: the defaults section is essentially the POSIX section
* since this is my main development platform
*/
#ifndef WRITEMODE
#define WRITEMODE "w"
#endif
#ifndef READMODE
#define READMODE "r"
#endif
#ifndef PATHSEP
#define PATHSEP "/"
#endif
/*
* Define PI if we don't have it already
* This is the case for Watcom 10.6, for example.
*/
#ifndef M_PI
#define M_PI 3.14159265358979323846 /* pi */
#endif
#ifdef NEED_GETOPT
extern int getopt(int nargc, char **nargv, char * ostr);
extern char *optarg;
extern int optind;
#endif
/* The dreaded boolean type is introduced in so many places.
* The PDF_HAS_BOOL define is a humble attempt to handle this situation.
*/
#ifndef PDF_HAS_BOOL
typedef int bool;
#endif
#endif /* P_PORT_H */